package com.handsome.代理模式.动态代理;

/**
 * @author niechun
 * @date 2023/3/11 17:16
 */
public class Client {
    public static void main(String[] args) {
        //创建目标对象
        ITeacher teacher = new TeacherDao();
        ///给目标对象创建代理对象
        ITeacher proxy = (ITeacher) new ProxyFactory(teacher).newInstance();
        proxy.teach();
        System.out.println(proxy);

    }
}
